function ExpendList(btn) {
  return () => {
    // console.log(btn);
    const createdList = btn.nextElementSibling;
    // console.log(createdList);
    const expendImg = btn.getElementsByTagName("img")[0];
    // console.log(expendImg);
    if (createdList.style.display === "") {
      createdList.style.display = "none";
      if (expendImg) {
        expendImg.setAttribute("src", "../img/right-expendarrow.png")
      }
    } else {
      createdList.style.display = "";
      if (expendImg) {
        expendImg.setAttribute("src", "../img/bottom-expendarrow.png")
      }
    }
  }
}

export default ExpendList;